package com.patterns.singleton.lazyMode;

/**
 * Created by Xiao Yiyun on 2017/4/12.
 */
public class LazySingleton {

    private static LazySingleton lazySingleton = null;

    private LazySingleton() {
        System.out.println("进入构造函数");
    }

    public static LazySingleton getLazySingleton() {
        System.out.println("进入get函数");
        if (lazySingleton == null) {
            lazySingleton = new LazySingleton();
        }
        return lazySingleton;
    }

    public void Print() {
        System.out.println("进入功能方法");
    }
}
